package cn.codergege.demo.builder;

public class Director {
	private ComputerBuilder builder;
	public Director() {
		builder = new DellComputerBuilder();
	}
	public DellComputer directComputer() {
		Board board = builder.buildBoard();
		Cpu cpu = builder.buildCpu();
		
		DellComputer dellComputer = new DellComputer();
		dellComputer.setBoard(board);
		dellComputer.setCpu(cpu);
		return dellComputer;
	}
	
}
